<%@ page language="java" contentType="text/html; charset=GBK"  
    pageEncoding="GBK"%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
<html>  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=GBK">  
<title>Login</title>  
<style type="text/css">  
body{   
 color : #000 ;   
 font-size : 12px ;   
  
 margin : 0px auto ;   
 }   
  
</style>  
  
<script type="text/javascript">  
    function check(){   
    	
        if(document.getElementByName("username").value == ""){   
        
            alert("pls input username"); 
               
            return false;   
        }   
        if(document.getElementByName("password").value == ""){   
            alert("pls input password");   
              
            return false;   
        }   
        if (document.getElementByName("accessibility").value == "") {
        	alert ("please input accessibility");
        	return false;
        }
        if (document.getElementByName("accessibility").value < 1 || document.getElementById("accessibility").value > 5) {
        	alert ("Please input accessibility between 1 and 5");
        	return false;
        }
        if (document.getElementByName("email").value == "") {
        	alert ("Please input email address");
        	return false;
        }
        alert ("have been run");
        return false;	
    }
    function check_assignmemnt_form() {
    	if (document.getElementByName("pollid").value == "") {
    		alert ("Please input pollid");
    		return false;
    	}
    }   
  
</script>  
</head>  
<body>  
<form action="CreateUserServlet" method="post" name="check_user_form()" onsubmit="return check()">  
       
       
<table border="1" cellspacing="1" cellpadding="1"  bordercolor="silver" align="center">  
   <tr>  
      <td colspan="2" align="center" bgcolor="#e8e8e8">Create User</td>  
   </tr>  
   <tr>  
      <td>user name</td>  
      <td><input type="text" name="username"/></td>  
   </tr>  
   <tr>  
      <td>password</td>  
      <td><input type="password" name="password"/></td>  
   </tr>  
   <tr>
   		<td>accessibility</td>
   		<td><input type="text" name="accessibility"></input></td>
   </tr>
   <tr>	
   		<td>email</td>
   		<td><input type="text" name="email"/></input></td>
   
   </tr>
   <tr>  
   		
      <td></td>  
       
      <td><input type="submit" name="submit"/><input type="reset" name="reset"/></td>  
   </tr>  
</table>  
  
</form>  

<form action="AssignPollServlet" method="post" name="assign_pm_form()">  
       
       
<table border="1" cellspacing="1" cellpadding="1"  bordercolor="silver" align="center">  
   <tr>  
      <td colspan="2" align="center" bgcolor="#e8e8e8">Inform PM Poll Ready For Administering</td>  
   </tr>  

   <tr>  
      <td>Poll Id</td>  
      <td><input type="text" name="pollid"></input></td>  
   </tr>  

   <tr>  
   		
      <td></td>  
       
      <td><input type="submit" name="submit" onclick="return check_assignmemnt_form();"/><input type="reset" name="reset"/></td>  
   </tr>  
</table>  
  
</form>  
</body>  
</html>  
